Skip to content

Comments

feat: add validate command and dry-run mode for sync/clean#8

Open
sonwr wants to merge 3 commits intomainfrom
feat/validate-and-dry-run
Open

feat: add validate command and dry-run mode for sync/clean#8
sonwr wants to merge 3 commits intomainfrom
feat/validate-and-dry-run

Conversation

@sonwr
Copy link

@sonwr sonwr commented Feb 25, 2026

Summary

This PR adds two usability features to heymark CLI:

  1. validate command for skill frontmatter/name validation
  2. --dry-run mode for sync and clean commands

What changed

  • Added new command: heymark validate
    • checks required description
    • checks alwaysApply type is boolean when provided
    • checks globs type is string when provided
    • checks duplicate skill names
    • exits with non-zero code on validation failures
  • Added dry-run flags for sync/clean:
    • --dry-run and -n
    • sync dry-run prints planned generation without writing files
    • clean dry-run prints planned cleanup without deleting files
  • Added dry-run support in shared tool generators/cleaners (HEYMARK_DRY_RUN=1).
  • Updated help output and README command examples.

Validation

Executed locally:

  • node src/index.js help
  • node src/index.js link https://github.com/MosslandOpenDevs/heymark.git --folder skill-samples
  • node src/index.js validate
  • node src/index.js sync . --dry-run
  • node src/index.js clean . --dry-run

All commands ran successfully with expected output.

sonwr and others added 3 commits February 25, 2026 12:02
- readCache(cwd, { update: false }) skips writeCache/gitPull
- validate and clean use local cache; sync remains the only command that updates from remote
- preserves local cache changes when running validate or clean
@yezzero
Copy link
Member

yezzero commented Feb 25, 2026

sync 명령어가 따로 있으므로
validate나 clean을 할 때는 sync를 원하지 않을 수도 있을 거 같아 수정을 해봤습니당

예상 시나리오:
1. 원격에 있는 스킬들을 sync해두고
2. 로컬에서 상황에 맞춰 수정해뒀는데 (ex: 이 프젝에서만은 이 스킬이 alwaysApply: false여야 할 때)
3. validate/clean 호출하면 모르는 사이에 git pull이 되어 어리둥절

더 불편할 것 같다면 없애겠습니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants